package argirithm;

import java.util.Random;

public class lx {
    public static void main(String[] args) {
        String str = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"+
                "abcdefghijklmnopqrstuvwxyz"+
                "0123456789-_";
        char[] chars = new char[6];
        Random random = new Random();
        for (int i = 0; i <chars.length ; i++) {
            chars[i]  = str.charAt(random.nextInt(str.length()));
        }
        //--------------------
        StringBuilder sb = new StringBuilder();
        for (char c :chars) {
            System.out.println(c);
            if (c>='A'&&c<='Z'){
                c = (char)(c+32);
                sb.append((c));
            }else if (c>='a'&&c<='z'){
                c = (char)(c-32);
                sb.append(c);
            }else if (c>='0'&&c<='9'){
               int n  = (char)(c-'0');
                for (int i = 0; i <n ; i++) {
                    sb.append(n);
                }
            }else{
                sb.append("\\").append(c=='-'?'_':'-');
            }
        }
        System.out.println(sb);
    }
}
